package com.example.demo.typeEnums;

public enum SymbolType {

    LESS_THAN("<","<"),

    GREATER_THAN(">",">"),

    EQUAL("=","="),

    NOT_EQUAL("<>","<>"),

    LESS_THAN_OR_EQUAL("<=","<="),

    GREATER_THAN_OR_EQUAL(">=",">="),

    LIKE("LIKE","LIKE"),

    IN("IN","IN"),

    NOT_IN("NOT IN","NOT IN"),

    ;

    private String name;
    private String value;

    SymbolType(String name,String value) {
        this.name = name;
        this.value = value;
    }

    public String getName(){
        return name;
    }
    public String getValue() {
        return value;
    }

    public static SymbolType getSymbolType(String name, String value){
        for(SymbolType executeType : SymbolType.values()){
            if(executeType.name.equals(name) || executeType.value.equals(value)){
                return executeType;
            }
        }
        return null;
    }
}
